<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
        <style>
            progress {
                background-image: repeating-linear-gradient(
                    45deg,
                    red,
                    transparent
                );
            }
            div {
                width: 200px;
                height: 20px;
                background-image: repeating-linear-gradient(
                    45deg,
                    red 0 5px,
                    transparent 5px 10px
                );
                animation: loop 0.3s infinite linear;
            }
            @keyframes loop {
                from {
                    background-position: 0px;
                }
                to {
                    background-position: 15px;
                }
            }
        </style>
    </head>
    <body>
        <progress value="22" max="100"></progress>
        <div></div>
    </body>
    <script type="text/javascript" src="./utils.js"></script>
    <script>
        // const year = 40;
        // const inflationRate = 1.03
        // console.log(`若通货膨胀率为： ${(inflationRate - 1) * 100 | 0}%/年`)
        // let sum = 0;
        // let cur = 1; // 单位：W
        // for(let i = 0; i < year; i ++) {
        //   console.log(`第${i + 1}年生活费：${cur}`)
        //   sum += cur;
        //   cur *= inflationRate;
        // }
        // console.log("合计：", sum)

        // const log = console.log;
        // const sleep = (timeout) => {
        //     return new Promise((resolve) => {
        //         setTimeout(() => {
        //             resolve();
        //         }, timeout);
        //     });
        // };

        // const main = async () => {
        //     await sleep(1000);
        //     log(1);
        //     await sleep(2000);
        //     log(2);
        //     await sleep(3000);
        //     log(3);
        // };

        // console.log("func Start")
        // main();
        // console.log("func End")

        // try {
        //     undefined.a;
        // } catch (err) {
        //     console.log(err);
        // }

        var o = {
            age: 18,

            a: {
                fn: function () {
                    console.log(this.age);
                },
            },
        };
        o.a.fn();
    </script>
</html>
